<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //需求：写两个人的信息，包含姓名和年龄。
      //需求：再加两个人，再加两个属性（改动点*4）,构造器(改动点*2)

      {
        // 错误的写法
        const kevin_name = "kevin";
        const kevin_age = 35;

        const henry_name = "henry";
        const henry_age = 36;
      }

      {
        //正确写法
        function Person(name, age) {
          this.name = name;
          this.age = age;
        }

        const kevin = new Person("kevin", 35);
      }
    </script>
  </body>
</html>
